Skip to content

Conversation

@sgindeed
Copy link
Contributor

@sgindeed sgindeed commented Oct 8, 2025

  • Implemented the Minimum Window Substring algorithm in R.
  • Uses sliding window and hashing to find the smallest substring containing all target characters.
  • Prints both the minimum window substring and its length.
  • Handles case-insensitive input for consistent results.
  • Applies an efficient two-pointer technique to dynamically resize the window.
  • Time Complexity: O(n)
  • Space Complexity: O(k), where k is the character set size.

@sgindeed sgindeed requested review from acylam and siriak as code owners October 8, 2025 13:00
@siriak siriak requested a review from Copilot October 8, 2025 20:59
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new Minimum Window Substring algorithm implementation in R using a sliding window approach with two pointers. The algorithm finds the smallest substring in a main string that contains all characters from a target string.

Key changes:

  • Implements efficient sliding window algorithm with O(n) time complexity
  • Provides interactive input handling with case-insensitive processing
  • Includes comprehensive edge case handling and clear output formatting

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@siriak siriak merged commit 96737fe into TheAlgorithms:master Oct 8, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants